package StudyCode.summary.symboliclink;

import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CreateHardLink {
	public static void main(String[] args) {
		Path link = FileSystems.getDefault().getPath("test");
		Path target = FileSystems.getDefault().getPath("E:/Copy", "test.txt");
		try {
			Files.createLink(link, target);
		} catch (IOException | UnsupportedOperationException | SecurityException e) {
			System.err.println(e);
		}
	}
}
